<template>
  <div id="app" class="views">
    <router-view @upupup="change" class="view" keep-alive></router-view>
  </div>
</template>

<script>
  import { mapActions } from 'vuex'
  export default {
    name: 'views',
    data() {
      return {
        checked: false,
        user: {
          name: '',
          password: ''
        },
        loading: false
      }
    },
    sockets: {
      reconnecting: function () {
        console.log('正在重新连接...')
      },
      connecting: function () {
        console.log('连接中...')
      },
      connect: function () {
        console.log('连接成功')
      },
      connect_failed: function () {
        console.log('连接失败')
      },
      disconnect: function () {
        console.log('断开连接')
      },
      message: function (data) {
        console.log('正在监听消息', data)
      },
      anything: function (data) {
        console.log('正在监听事件', data)
      }
    },
    created: function () {

    },
    methods: {
      change(msg) {
        console.log('apppppppp', msg)
      },
        ...mapActions(['getAppIoSockt'])
    }
  }

</script>

<style>
  .view {
    background-color: #f4f4f4;
  }
  
  @import "./assets/css/base.css"
</style>